<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body>div {
            width: 200px;
            height: 200px;
            border: 1px solid red;
            overflow: hidden;
        }

        #d1,
        #d2,
        #d3 {
            width: 50px;
            height: 50px;
        }

        #d1 {
            background-color: red;
        }

        #d2 {
            background-color: green;
        }

        #d3 {
            background-color: blue;
        }

        ul {
            list-style-type: none;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }

        ul li {
            float: left;
            margin-right: 20px;
        }

        li a {
            text-decoration: none;
        }
    </style>
</head>

<body>
    <ul>
        <li><a href="">首页</a></li>
        <li><a href="">免费课</a></li>
        <li><a href="">直播课</a></li>
        <li><a href="">线上课</a></li>
        <li><a href="">线下课</a></li>
    </ul>
    <div>
        <div id="d1"></div>
        <div id="d2"></div>
        <div id="d3"></div>
    </div>
</body>

</html>